package com.bmd.backgroundmanger.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bmd.backgroundmanger.entity.UserAnswer;

import java.util.List;

/**
 * 用户答题记录Service接口
 */
public interface IUserAnswerService extends IService<UserAnswer> {

    /**
     * 提交答案
     */
    boolean submitAnswer(UserAnswer userAnswer);

    /**
     * 获取用户答题历史
     */
    List<UserAnswer> getUserAnswerHistory(Integer userId);

    /**
     * 获取用户正确率
     */
    Double getUserCorrectRate(Integer userId);

    /**
     * 获取题目正确率
     */
    Double getQuestionCorrectRate(Integer questionId);
} 